/**
 * Tests our methods
 * 
 * 
 * @author Konrad Paumann
 * @author Maximilian Csuk
 * @author Bernhard Denner
 * 
 */
public class Test {
	static final String TEXT_1 = "Lorem ipsum pri eu tota soluta ...";
	static final String TEXT_2 = "At etiam quaestio nam, vim populo ...";

	public void testStringSeparator(String text1, String text2, 
			StringSeparator stringSep) {
		System.out.println("Test StringSeparator Type: " + stringSep.getClass());
		System.out.println(text1);
		stringSep.print();
		System.out.println(text2);
	}
	
	public void testCharSeparator(String text1, String text2,
			CharSeparator charSep) {
		System.out.println("Test CharSeparator Type: " + charSep.getClass());
		System.out.println(text1);
		charSep.print();
		System.out.println(text2);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Test t = new Test();
		StringSeparator emptySep = new EmptySeparator();
		t.testStringSeparator(TEXT_1, TEXT_2, emptySep);
		emptySep.setLineCount(3);
		t.testStringSeparator(TEXT_1, TEXT_2, emptySep);
		
		StringSeparator repeatedSep = new RepeatedSeparator("TRENNTEXT");
		t.testStringSeparator(TEXT_1, TEXT_2, repeatedSep);
		repeatedSep.setLineCount(5);
		t.testStringSeparator(TEXT_1, TEXT_2, repeatedSep);
		
		CharSeparator lineSep = new LineSeparator('=',3);
		t.testCharSeparator(TEXT_1, TEXT_2, lineSep);
		lineSep.setChar('+', 10);
		t.testCharSeparator(TEXT_1, TEXT_2, lineSep);
		
		CharSeparator blockSep = new BlockSeparator('-', 15);
		t.testCharSeparator(TEXT_1, TEXT_2, blockSep);
		blockSep.setChar('+', 10);
		t.testCharSeparator(TEXT_1, TEXT_2, blockSep);
		BlockSeparator blockSep2 = new BlockSeparator('-', 15);
		blockSep2.setLineCount(5);
		t.testCharSeparator(TEXT_1, TEXT_2, blockSep2);
	}

}
